<template>
	<view v-if="Object.keys(analysisData).length > 0">
		<!-- <view class="status_bar">
				</view>
				<view class="navigation">
					<uni-icons 
					type="search" 
					color="white" 
					size="26"
					@click="searchBth">
						
					</uni-icons>
					<text>行业分析详情</text>
				</view> -->

		<!-- <view class="status_bar" :style="{height:height+'px'}"></view>
		<uni-nav-bar title="行业分析详情" fixed="true" color="#ffffff">
			<view slot="left" @click="back">
				<u-icon name="arrow-left"></u-icon>
			</view>
		</uni-nav-bar> -->

		<view class="image">
			<image :src="'https://jsjhj.net'+analysisData.images" mode=""></image>
		</view>

		<view class="center">
			<!-- <view class="" v-html="message.navicontenttf">

			</view> -->
			<view class="complete_name">
				{{analysisData.complete_name}}
			</view>
			<view class="date">
				{{analysisData.create_date}}
			</view>

			<!-- <view style="padding: 0 20rpx;" v-html="analysisData.content">

			</view> -->
			<view style="padding: 0 20rpx;">
				<u-parse :html="analysisData.content"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	import api from '@/static/js/api.js'

	import {
		writeVideoClick
	} from '@/static/js/api/home.js';

	import share from '@/mixins/src/sharepage.js'

	import wTitleBar from '@/components/w-titleBar/w-titleBar.vue'

	import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'

	export default {
		onLoad(option) {
			uni.showLoading({
				title: '加载中'
			})
			this.id = option.id
			writeVideoClick(this.id).then(res => {
				// console.log(res);
			})
			api.getAnalysisData(this.id).then(res => {
				this.analysisData = res.data[0]
				this.share = {
					title: res.data[0].complete_name,
					path: `/pages/home/industry/components/industryDetails?id=${this.id}`,
					// imageUrl:require('../../../../static/image/logo.png')
				}
				uni.hideLoading();
			})
		},
		mixins: [share],
		data() {
			return {
				message: '',
				analysisData: {},
				id: 0,
				height: 0
			}
		},
		components:{
			wTitleBar,
			uniNavBar
		},
		onShow() {
			wx.getSystemInfo({
				success: res => {
					this.height = res.statusBarHeight
				}
			})
		},
		methods: {
			// back() {
			// 	uni.showModal({
			// 		title: '注册未完成，是否确认退出?',
			// 		success: (res) => {
			// 			if (res.confirm) {
			// 				uni.clearStorageSync();
			// 				uni.switchTab({
			// 					url: "/pages/main/mine"
			// 				})
			// 			}
			// 		}
			// 	});
			// }
		}
	}
</script>

<style lang="less" scoped>
	.image {
		width: 100vw;
		height: 500rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.center {
		margin-top: 20rpx;
		color: #808080;
		font-size: 28rpx;

		.date {
			text-align: center;
			font-size: 36rpx;
			color: #000;
		}
		.complete_name{
			text-align: center;
			font-size: 36rpx;
			color: #000;
			padding: 20rpx 20rpx;
			font-weight: bold;
		}
	}

	.status_bar {
		width: 100%;
		background-color: #B8212B;
	}

	/deep/.titlebarbar {
		position: relative;

		.textCenter {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			margin-left: 0rpx !important;
		}
	}

	/deep/.titlebarbar {
		font-weight: normal;
		font-size: 26rpx;

		image {
			margin-left: 0rpx;
			cursor: pointer;
		}
	}

	/deep/.uni-navbar--border {
		border: none;
	}

	/deep/.uni-navbar__header {
		background-color: #B8212B;
	}
</style>
